1. Field of the Invention
The present invention relates to a motor control device for driving an AC motor used in a feed shaft or a spindle of various industrial machines such as machine tool, robot arm, injection molding machine, electric discharge machine, and motor-driven press.
2. Description of the Prior Art
Control methods for driving AC motors such as AC servo motor include PWM (pulse width modulation) method, variable frequency method, amplitude modulation method, etc.
In the PWM method, a switching element of a three-phase inverter is controlled to be turned on and off by a PWM signal generated by the PWM method, and a voltage from a direct-current power source is applied to each phase of the motor to drive and control the motor. FIG. 1 shows a part (for one phase) of a three-phase inverter, and this three-phase inverter has a combination of transistors T1 and T2 for each phase as a switching element.
FIG. 2 is an explanatory diagram of dead zone in PWM control for turning on and off the transistors of the inverter. A PWM command (voltage command) issued from current control loop or the like and a triangular wave (or sawtooth wave) are compared with each other. When the triangular wave is higher than the PWM command, a PWM signal is generated such that the transistor T1 is on while the transistor T2 is off. On the other hand, when the triangular wave is lower than the PWM command, the transistor T1 is off while the transistor T2 is on.
However, if the combined transistors T1 and T2 are simultaneously turned on, then the control power source E is short-circuited and an excessive current may flow. To avoid such phenomenon, for both transistors T1 and T2, simultaneous OFF time is provided as a dead zone xcex4 when on/off changeover is performed.
The time width of the dead zone xcex4 is determined based on the switching speed of the transistor serving as a switching element, and it is usually about several microseconds. The dead zone xcex4 is provided by shortening the ON time of the transistors T1, T2. Further, upon every on/off of the PWM signal of rectangular wave for turning on and off the transistors T1, T2, a dead zone xcex4 of specific width is provided.
Accordingly, when the on/off period of PWM signal becomes shorter, that is, when the period of the triangular wave (PWM period) becomes shorter, the number of times the dead zone xcex4 is provided within a specific time increases, and the duration of non-application time of voltage to the motor is increased (note that voltage is applied to the motor when one of the transistors T1 and T2 is on and the other is off).
When the motor accelerates or decelerates steeply, the duration of one of the transistors being off and the other being on becomes longer. However, as a dead zone xcex4 exists, ON time becomes shorter by the time width of this dead zone xcex4, and voltage is not applied to the motor for the time corresponding to the dead zone, thereby undesirably decreasing the output torque of the motor during a steep acceleration or deceleration.
Generally, as current control period becomes shorter, PWM period (period of triangular wave) becomes shorter, too. If the period becomes shorter, error can be detected and corrected quickly, and improvement of control precision (operation precision, machining precision, moving track precision, etc.) is realized. However, as the number of times of PWM period within a specific time increases, the number of times of appearance of dead zone also increases, which results in a decline of torque.
It is an object of the invention to provide a motor control device capable of solving the problem of decline of output torque of motor due to effects of duration of dead zone in which voltage is not applied to the motor in PWM control.
In the invention, taking into consideration decline of output torque of motor due to effects of duration of dead zone in which voltage is not applied to the motor in PWM control, PWM period is changed depending on whether a high torque is required or a high control precision is required, and torque decline is prevented when high torque is required, while the control precision is enhanced rather than higher torque when the control precision is required.
The principle of the invention is explained by referring to FIG. 3. Usually, in order to improve the control precision (operation precision, machining precision, moving track precision, etc.), the operation is set in mode B in which the current control period and PWM period are shorter. As the period is shorter, the control precision is enhanced. On the other hand, when a high torque is required, in high acceleration or deceleration, for example, the operation is set in mode A where both current control period and PWM period are longer, or at least the PWM period is longer. Accordingly, the rate of the time of dead zone xcex4 within a specified time is decreased. As a result, decrease of generated torque due to dead zone xcex4 can be suppressed optimally.
In the present invention, in the numerical controller of the motor control device, PWM period change instructing means for instructing change of PWM period is provided. Further, in the servo controller of the motor control device, PWM period changing means for changing the PWM period corresponding to the PWM period changing command is provided. Accordingly, to cope with a case whether a high control precision is required or a high torque is required, a command is issued from the numerical controller, and the motor is controlled by changing over to mode B or mode A.
The PWM period change instructing means issues a command for changing a PWM period, such as mode B or mode A, according to the type of a move command issued from the numerical controller, or according to operation precision, operating speed or degree of speed change instructed by the move command.
Moreover, PWM period is created by triangular waves, and the PWM period changing means changes the PWM period by changing the frequency of the triangular wave. Still more, the PWM period changing means also changes over, together with change of PWM period, current loop gain, speed loop gain and/or position loop gain in the servo controller.